

**********运行环境：Stata 15.1及以上版本**********
clear
cd D:\中国工业经济论文附件\数据


**********描述性统计**********
use baseline, clear

ssc install sum2docx, replace
sum2docx Patent Patent_R Patent1 Patent2 Fintech Fintech_R Size LEV Growth CapEx PPE ///
	Indep GDP Population using 实证结果.docx, replace ///
	stats(N mean(%9.4f) sd(%9.4f) min(%9.4f) median(%9.4f) max(%9.4f)) ///
	title("表1：主要变量的基本统计特征")

ssc install report, replace
report, rows(Fintech, count | Fintech, mean %9.4f) cols(year) rowsby(region) ///
	file(实证结果) title(表2：金融科技发展分年份和地区的趋势变化)


**********基准回归**********
xtset code year

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m1

xtreg Patent1 Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m2

xtreg Patent2 Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m3

ssc install reg2docx, replace
reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("专利总产出(Patent)" "发明专利(Patent1)" "非发明专利(Patent2)") ///
	scalars(N r2_w(%9.4f)) b(%9.4f) t(%9.4f) title("表3：基准回归结果")


**********工具变量回归**********
use IV, replace
xtset code year

xtivreg Patent (Fintech = FintechIV) Size LEV Growth CapEx PPE Indep GDP Population ///
	i.year#i.industry, fe vce(cluster city)
est store m1

xtivreg Patent1 (Fintech = FintechIV) Size LEV Growth CapEx PPE Indep GDP Population ///
	i.year#i.industry, fe vce(cluster city)
est store m2

xtivreg Patent2 (Fintech = FintechIV) Size LEV Growth CapEx PPE Indep GDP Population ///
	i.year#i.industry, fe vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("专利总产出(Patent)" "发明专利(Patent1)" "非发明专利(Patent2)") scalars(N) ///
	b(%9.4f) z(%9.4f) noconstant title("表4：工具变量回归结果")


**********稳健性检验1**********
use robust1, clear

xtset code year

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m1

xtreg Patent1 Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m2

xtreg Patent2 Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("专利总产出(Patent)" "发明专利(Patent1)" "非发明专利(Patent2)") ///
	scalars(N r2_w(%9.4f)) b(%9.4f) t(%9.4f) noconstant ///
	title("表5：剔除样本期内从未申请专利的企业的稳健性检验")


**********稳健性检验2**********
use robust2, clear

xtset code year

xtreg Patent Fintech Branch Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m1

xtreg Patent1 Fintech Branch Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m2

xtreg Patent2 Fintech Branch Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("专利总产出(Patent)" "发明专利(Patent1)" "非发明专利(Patent2)") ///
	scalars(N r2_w(%9.4f)) b(%9.4f) t(%9.4f) noconstant ///
	title("表6：考虑金融发展水平的稳健性检验")


**********稳健性检验3**********
use robust3, clear

xtset code year

reg RD_Sales Fintech Size LEV Growth CapEx PPE Indep GDP Population, vce(cluster city)
est store m1

xtreg RD_Sales Fintech Size LEV Growth CapEx PPE Indep GDP Population, fe vce(cluster city)
est store m2

xtreg RD_Sales Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("RD/Sales" "RD/Sales" "RD/Sales") scalars(N r2_a(%9.4f) r2_w(%9.4f)) ///
	b(%9.4f) t(%9.4f) noconstant title("表7：基于研发支出的稳健性检验")


**********稳健性检验4**********
use robust4, clear

xtset code year

logit Patent_R Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year i.industry ///
	i.city, vce(cluster city)
est store m1

tobit Patent_R Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year i.industry ///
	i.city, vce(cluster city) ll(0)
est store m2

poisson Patent_R Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year i.industry ///
	i.city, vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append ///
	indicate("年份=*year" "行业=*industry" "城市=*city") mtitles("Logit" "Tobit" "Poisson") ///
	scalars(N r2_p(%9.4f)) b(%9.4f) t(%9.4f) noconstant title("表8：基于非线性模型的稳健性检验")


**********稳健性检验5**********
use robust5, clear

xtset code year

logit Patent_R Fintech L.RD_Sales Size LEV Growth CapEx PPE Indep GDP Population i.year ///
	i.industry i.city, vce(cluster city)
est store m1

tobit Patent_R Fintech L.RD_Sales Size LEV Growth CapEx PPE Indep GDP Population i.year ///
	i.industry i.city, vce(cluster city) ll(0)
est store m2

poisson Patent_R Fintech L.RD_Sales Size LEV Growth CapEx PPE Indep GDP Population i.year ///
	i.industry i.city, vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append ///
	indicate("年份=*year" "行业=*industry" "城市=*city") mtitles("Logit" "Tobit" "Poisson") ///
	scalars(N r2_p(%9.4f)) b(%9.4f) t(%9.4f) noconstant ///
	title("表9：控制滞后一期研发支出的稳健性检验")


**********机制分析1**********
use channel1, clear

xtset code year

xtreg FC Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m1

xtreg Patent FC Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry, ///
	fe vce(cluster city)
est store m2

xtreg Patent Fintech FC FC_Fintech Size LEV Growth CapEx PPE Indep GDP Population ///
	i.year#i.industry, fe vce(cluster city)
est store m3

reg2docx m1 m2 m3 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("融资约束(FC)" "专利总产出(Patent)" "专利总产出(Patent)") ///
	order(Fintech FC FC_Fintech) scalars(N r2_w(%9.4f)) b(%9.4f) t(%9.4f) ///
	noconstant title("表10：基于融资约束的机制分析")


**********机制分析2**********
use channel2, clear

xtset code year

xtreg Patent Fintech Subsidy Fintech_Subsidy Size LEV Growth CapEx PPE Indep GDP ///
	Population i.year#i.industry, fe vce(cluster city)
est store m1

xtreg Patent Fintech TaxRebate Fintech_TaxRebate Size LEV Growth CapEx PPE Indep GDP ///
	Population i.year#i.industry, fe vce(cluster city)
est store m2

reg2docx m1 m2 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("专利总产出(Patent)" "专利总产出(Patent)") ///
	order(Fintech Subsidy Fintech_Subsidy TaxRebate Fintech_TaxRebate) ///
	scalars(N r2_w(%9.4f)) b(%9.4f) t(%9.4f) noconstant ///
	title("表11：基于政府补助和税收返还的机制分析")


**********异质性分析**********
use heterogeneity, clear

xtset code year

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry ///
	if EastArea == 1, fe vce(cluster city)
est store m1

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry ///
	if EastArea == 0, fe vce(cluster city)
est store m2

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry ///
	if HighTech == 1, fe vce(cluster city)
est store m3

xtreg Patent Fintech Size LEV Growth CapEx PPE Indep GDP Population i.year#i.industry ///
	if HighTech == 0, fe vce(cluster city)
est store m4

reg2docx m1 m2 m3 m4 using 实证结果.docx, append indicate("年份*行业=*#*industry") ///
	mtitles("东部地区" "中西部地区" "高科技行业" "非高科技行业") scalars(N r2_w(%9.4f)) ///
	b(%9.4f) t(%9.4f) title("表12：异质性分析结果")

